<?php

require_once 'Ext/Oauth/Login/ShowForm/Abstract.php';

class Ext_Oauth_Login_ShowForm_Adapter_Ucenter extends Ext_Oauth_Login_ShowForm_Abstract
{
    public function showLoginForm(Ext_Oauth_Login_Result $oauthResult)
    {
        $show = new Ext_Login_Show();
        $viewForm = $show->show()->buildLoginForm();
        
        $viewForm->getElement('oauth')->setValue(1);
        
        return $viewForm;
    }
    
    public function showRegisterForm(Ext_Oauth_Login_Result $oauthResult)
    {
        $show = new Ext_Register_Show();
        $viewForm = $show->show()->buildRegisterForm();
        $viewForm->getElement('oauth')->setValue(1);
        $viewForm->getElement('nickname')->setValue($oauthResult->getDataNickname());
        
        return $viewForm;
    }
}
